import { createRouter, createWebHistory } from "vue-router";
import Chat from "@/views/Chat/Chat.vue";
import ChatList from "@/views/Chat/components/ChatList.vue";
import ContactList from "@/views/Chat/components/ContactList.vue";
import FriendsCircle from "@/views/Chat/components/FriendsCircle.vue";
import PersonalCenter from "@/views/Chat/components/PersonalCenter.vue";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      name: "chat",
      component: Chat,
      children: [
        {
          path: "/",
          name: "chatList",
          component: ChatList,
        },
        {
          path: "/contactList",
          name: "contactList",
          component: ContactList,
        },
        {
          path: "/friendsCircle",
          name: "friendsCircle",
          component: FriendsCircle,
        },
        {
          path: "/peronalCenter",
          name: "peronalCenter",
          component: PersonalCenter,
        },
      ],
    },
  ],
});

export default router;
